package com.service;

import com.dao.LoginDao;
import com.dao.UserDao;
import com.pojo.User;

import java.util.ArrayList;

public class LoginService {

    static LoginDao ld=  new LoginDao() ;

    public boolean queryUser(User u){

        User user = ld.QueryUser(u.getUserName());
        if(user!=null){
            if(user.getUserPassword().equals(u.getUserPassword())){
                return true;
            }else{
                return false;
            }
        }else{
            return false;
        }
    }
}
